<?php

 
my_component_load('testing' , false);
my_component_load('paging' , false);  
my_component_load('seleksi_mutasi' );
$task = isset($_GET['task']) ? $_GET['task'] : "";  
$id = isset( $_GET['id'] ) ? $_GET['id']:  0;

$modulname = "Personalia _BN_ Penempatan _BN_ Rekruitment _BN_ Internal"; 
if($_SERVER['REQUEST_METHOD'] == "POST" ){
	if($task == "form_seleksi_mutasi"){ 
		if($validasi = validasi_seleksi_mutasi()){
			$content   = message_multi_error($validasi); 
			$content .= form_seleksi_mutasi($id ); 
		}else{
			submit_seleksi_mutasi($id);
			my_direct('index.php?com='.$_GET['com']);
		}
	}	
}else{ 	
	if($task == "form_seleksi_mutasi"){ 
		$pagename = $modulname." _BN_ ". ($id == 0 ? "Create data" : "Update data"); 
		$content = form_seleksi_mutasi($id);
	}elseif($task == "detail"){  		
		$pagename = $modulname." _BN_ Detail";
		$content = detail_karyawan_mutasi($id);
generate_my_web($content, $pagename,"plain.php" );exit;
	}elseif($task == "delete"){  
		delete_seleksi_mutasi($id);
		my_direct($_SERVER['HTTP_REFERER']);
	}else{ 
		$pagename = $modulname;
		load_facebox_script();
		$content =  list_seleksi_mutasi();  
	}
}  
generate_my_web($content, $pagename );
?>